home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / ShowHZ.vlt < prev    next >
Text File  |  1996-09-26  |  1KB  |  39 lines

  1. /*****************************************************************************
  2. *** ShowHZ.vlt -- convert current screen contents into chinese (HZView)
  3. *****************************************************************************/
  4.  
  5. NL = '0A'x                      /* newline character */
  6. tag = 'rt_pubscrname=VLT'
  7. HZVdir = 'TEMP:HZV/'
  8. Portname = HZV.1
  9. CurrentLine = ""
  10. filename = "T:vlt_HZVbuf"
  11.  
  12.                                 /* make sure HZV is already running */
  13. if ~showlist('P','HZV.1') then do
  14.     address command 'requestchoice "ShowHZ.vlt" "You must start HZV first!!!" ok'
  15.     exit 0
  16. end
  17. "activate next"                 /* switch to another screen */
  18.                                 /* save current cursor position */
  19. "extract x"; CursorX = vlt.x
  20. "extract y"; CursorY = vlt.y
  21.                                 /* make sure we start with non-empty line */
  22. do y=1 while CurrentLine = ""
  23.   "movecursor 1 "y
  24.   "extract reviewlineatcursor"; CurrentLine = vlt.reviewlineatcursor
  25. end
  26.  
  27. "review r" "'"CurrentLine"'"    /* set search line to current line */
  28. "review s b"                    /* select from search line (current line) to bottom */
  29. "review a "filename             /* save to a file */
  30.  
  31. "movecursor "CursorX CursorY    /* restore old cursor position */
  32. address HZV.1 'open 7 'filename /* show the page contents in chinese */
  33.                                 /* tell user file is ready */
  34. "message (flip screen to see CHINESE!)"
  35. "delay 1"
  36. "message"
  37.  
  38. exit(0)
  39.